<template>
  <div class="time-line">
    <el-timeline style="max-width: 400px">
      <el-timeline-item
        v-for="(item, index) in timeLineData"
        :key="index"
        :timestamp="item.timestamp"
        :color="item.color"
        placement="top"
      >
        <el-card>
          <h4 class="card-title">{{ item.content }}</h4>
          <p class="card-tips">{{ item.tips }}</p>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script setup>
import { useAqiFeedbackStore } from '@/stores/aqi/aqiFeedback.js'
import { storeToRefs } from 'pinia'

const aqiFeedbackStore = useAqiFeedbackStore()
const { timeLineData } = storeToRefs(aqiFeedbackStore)
</script>

<style scoped lang="scss">
.time-line {
  margin-left: 150px;
  justify-content: left;
  .card-title {
    font-size: 16px;
    font-weight: bold;
  }
  .card-tips {
    font-size: 12px;
    color: #999;
  }
}
</style>
